package main.java.indi.zyj.sword;

public class CrackNumber {

    public int crackNumber(int ciphertext) {

        String s = String.valueOf(ciphertext);
        int a = 1, b = 1;

        for(int i = 2; i <= s.length(); i++) {

            String tmp = s.substring(i - 2, i);

            int c = tmp.compareTo("10") >= 0 && tmp.compareTo("25") <= 0 ? a + b : a;

            b = a;
            a = c;

        }

        return a;
    }

}
